<%@ page import="java.util.List" %>
<%@ page import="com.foreknow.model.Guestbook" %>
<%@ page import="com.foreknow.model.Admin" %>

<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/2/27 0027
  Time: 9:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
</head>
<body>
<c:out value="" default="this is jstl"></c:out>
<%--    <%=list.size()%>--%>
    <div class="container">
        username: ${requestScope.admin.username}
        <table class="table table-hover">
            <tr>
                <td>编号</td>
                <td>姓名</td>
                <td>电话号码</td>
                <td>邮箱</td>
                <td>标题</td>
                <td>内容</td>
                <td>时间</td>
                <td>操作</td>
            </tr>
            <c:forEach var="gb" items="${list}" varStatus="status">
                <tr>
                    <td>${status.index+1}</td>
                    <td>${gb.name}</td>
                    <td>${gb.phone}</td>
                    <td>${gb.email}</td>
                    <td>${gb.title}</td>
                    <td>${gb.content}</td>
                    <td>${gb.createdtime}</td>
                    <td>
                        <a href="<%=request.getContextPath()%>/user/manager?id=${gb.id}&q=query" class="btn btn-primary">修改</a>
                        <a href="<%=request.getContextPath()%>/user/manager?id=${gb.id}&q=delete" class="btn btn-danger">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
</body>
</html>
